3.456 \(\int \frac{\cot ^8(c+d x)}{a+b \sin ^2(c+d x)} \, dx\)

Optimal. Leaf size=117 \[ \frac{(a+b)^{7/2} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{a^{9/2} d}+\frac{(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac{(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac{(a+b)^3 \cot (c+d x)}{a^4 d}-\frac{\cot ^7(c+d x)}{7 a d} \]

[Out]

((a + b)^(7/2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(a^(9/2)*d) + ((a + b)^3*Cot[c + d*x])/(a^4*d) - ((
a + b)^2*Cot[c + d*x]^3)/(3*a^3*d) + ((a + b)*Cot[c + d*x]^5)/(5*a^2*d) - Cot[c + d*x]^7/(7*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.112005, antiderivative size = 117, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3195, 325, 205} \[ \frac{(a+b)^{7/2} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{a^{9/2} d}+\frac{(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac{(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac{(a+b)^3 \cot (c+d x)}{a^4 d}-\frac{\cot ^7(c+d x)}{7 a d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^8/(a + b*Sin[c + d*x]^2),x]

[Out]

((a + b)^(7/2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(a^(9/2)*d) + ((a + b)^3*Cot[c + d*x])/(a^4*d) - ((
a + b)^2*Cot[c + d*x]^3)/(3*a^3*d) + ((a + b)*Cot[c + d*x]^5)/(5*a^2*d) - Cot[c + d*x]^7/(7*a*d)

Rule 3195

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> With[{ff
 = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[((d*ff*x)^m*(a + (a + b)*ff^2*x^2)^p)/(1 + ff^2*x^2)^(p
 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m}, x] && IntegerQ[p]

Rule 325

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(a*
c*(m + 1)), x] - Dist[(b*(m + n*(p + 1) + 1))/(a*c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cot ^8(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^8 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{\cot ^7(c+d x)}{7 a d}-\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{x^6 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac{(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac{\cot ^7(c+d x)}{7 a d}+\frac{(a+b)^2 \operatorname{Subst}\left (\int \frac{1}{x^4 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{a^2 d}\\ &=-\frac{(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac{(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac{\cot ^7(c+d x)}{7 a d}-\frac{(a+b)^3 \operatorname{Subst}\left (\int \frac{1}{x^2 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{a^3 d}\\ &=\frac{(a+b)^3 \cot (c+d x)}{a^4 d}-\frac{(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac{(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac{\cot ^7(c+d x)}{7 a d}+\frac{(a+b)^4 \operatorname{Subst}\left (\int \frac{1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{a^4 d}\\ &=\frac{(a+b)^{7/2} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{a^{9/2} d}+\frac{(a+b)^3 \cot (c+d x)}{a^4 d}-\frac{(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac{(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac{\cot ^7(c+d x)}{7 a d}\\ \end{align*}

Mathematica [A]  time = 1.08601, size = 135, normalized size = 1.15 \[ \frac{\cot (c+d x) \left (-a \left (122 a^2+112 a b+35 b^2\right ) \csc ^2(c+d x)+3 a^2 (22 a+7 b) \csc ^4(c+d x)+406 a^2 b-15 a^3 \csc ^6(c+d x)+176 a^3+350 a b^2+105 b^3\right )}{105 a^4 d}+\frac{(a+b)^{7/2} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{a^{9/2} d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^8/(a + b*Sin[c + d*x]^2),x]

[Out]

((a + b)^(7/2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(a^(9/2)*d) + (Cot[c + d*x]*(176*a^3 + 406*a^2*b +
350*a*b^2 + 105*b^3 - a*(122*a^2 + 112*a*b + 35*b^2)*Csc[c + d*x]^2 + 3*a^2*(22*a + 7*b)*Csc[c + d*x]^4 - 15*a
^3*Csc[c + d*x]^6))/(105*a^4*d)

________________________________________________________________________________________

Maple [B]  time = 0.132, size = 342, normalized size = 2.9 \begin{align*}{\frac{1}{d}\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}} \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}}+4\,{\frac{b}{da\sqrt{a \left ( a+b \right ) }}\arctan \left ({\frac{ \left ( a+b \right ) \tan \left ( dx+c \right ) }{\sqrt{a \left ( a+b \right ) }}} \right ) }+6\,{\frac{{b}^{2}}{{a}^{2}d\sqrt{a \left ( a+b \right ) }}\arctan \left ({\frac{ \left ( a+b \right ) \tan \left ( dx+c \right ) }{\sqrt{a \left ( a+b \right ) }}} \right ) }+4\,{\frac{{b}^{3}}{d{a}^{3}\sqrt{a \left ( a+b \right ) }}\arctan \left ({\frac{ \left ( a+b \right ) \tan \left ( dx+c \right ) }{\sqrt{a \left ( a+b \right ) }}} \right ) }+{\frac{{b}^{4}}{d{a}^{4}}\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}} \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}}-{\frac{1}{7\,da \left ( \tan \left ( dx+c \right ) \right ) ^{7}}}+{\frac{1}{da\tan \left ( dx+c \right ) }}+3\,{\frac{b}{{a}^{2}d\tan \left ( dx+c \right ) }}+3\,{\frac{{b}^{2}}{d{a}^{3}\tan \left ( dx+c \right ) }}+{\frac{{b}^{3}}{d{a}^{4}\tan \left ( dx+c \right ) }}+{\frac{1}{5\,da \left ( \tan \left ( dx+c \right ) \right ) ^{5}}}+{\frac{b}{5\,{a}^{2}d \left ( \tan \left ( dx+c \right ) \right ) ^{5}}}-{\frac{1}{3\,da \left ( \tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{2\,b}{3\,{a}^{2}d \left ( \tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{{b}^{2}}{3\,d{a}^{3} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^8/(a+sin(d*x+c)^2*b),x)

[Out]

1/d/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2))+4/d/a/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a*
(a+b))^(1/2))*b+6/d/a^2*b^2/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2))+4/d/a^3/(a*(a+b))^(1/2)*a
rctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2))*b^3+1/d/a^4/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2))*b
^4-1/7/d/a/tan(d*x+c)^7+1/d/a/tan(d*x+c)+3/d/a^2/tan(d*x+c)*b+3/d/a^3/tan(d*x+c)*b^2+1/d/a^4/tan(d*x+c)*b^3+1/
5/d/a/tan(d*x+c)^5+1/5/d/a^2/tan(d*x+c)^5*b-1/3/d/a/tan(d*x+c)^3-2/3/d/a^2/tan(d*x+c)^3*b-1/3/d/a^3/tan(d*x+c)
^3*b^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^8/(a+b*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.04278, size = 2006, normalized size = 17.15 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^8/(a+b*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/420*(4*(176*a^3 + 406*a^2*b + 350*a*b^2 + 105*b^3)*cos(d*x + c)^7 - 28*(58*a^3 + 158*a^2*b + 145*a*b^2 + 45
*b^3)*cos(d*x + c)^5 + 140*(10*a^3 + 29*a^2*b + 28*a*b^2 + 9*b^3)*cos(d*x + c)^3 + 105*((a^3 + 3*a^2*b + 3*a*b
^2 + b^3)*cos(d*x + c)^6 - 3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c)^4 - a^3 - 3*a^2*b - 3*a*b^2 - b^3 +
3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c)^2)*sqrt(-(a + b)/a)*log(((8*a^2 + 8*a*b + b^2)*cos(d*x + c)^4 -
 2*(4*a^2 + 5*a*b + b^2)*cos(d*x + c)^2 - 4*((2*a^2 + a*b)*cos(d*x + c)^3 - (a^2 + a*b)*cos(d*x + c))*sqrt(-(a
 + b)/a)*sin(d*x + c) + a^2 + 2*a*b + b^2)/(b^2*cos(d*x + c)^4 - 2*(a*b + b^2)*cos(d*x + c)^2 + a^2 + 2*a*b +
b^2))*sin(d*x + c) - 420*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c))/((a^4*d*cos(d*x + c)^6 - 3*a^4*d*cos(d*
x + c)^4 + 3*a^4*d*cos(d*x + c)^2 - a^4*d)*sin(d*x + c)), 1/210*(2*(176*a^3 + 406*a^2*b + 350*a*b^2 + 105*b^3)
*cos(d*x + c)^7 - 14*(58*a^3 + 158*a^2*b + 145*a*b^2 + 45*b^3)*cos(d*x + c)^5 + 70*(10*a^3 + 29*a^2*b + 28*a*b
^2 + 9*b^3)*cos(d*x + c)^3 - 105*((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c)^6 - 3*(a^3 + 3*a^2*b + 3*a*b^2
+ b^3)*cos(d*x + c)^4 - a^3 - 3*a^2*b - 3*a*b^2 - b^3 + 3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c)^2)*sqrt
((a + b)/a)*arctan(1/2*((2*a + b)*cos(d*x + c)^2 - a - b)*sqrt((a + b)/a)/((a + b)*cos(d*x + c)*sin(d*x + c)))
*sin(d*x + c) - 210*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(d*x + c))/((a^4*d*cos(d*x + c)^6 - 3*a^4*d*cos(d*x + c
)^4 + 3*a^4*d*cos(d*x + c)^2 - a^4*d)*sin(d*x + c))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**8/(a+b*sin(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.20032, size = 321, normalized size = 2.74 \begin{align*} \frac{\frac{105 \,{\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )}{\left (\pi \left \lfloor \frac{d x + c}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac{a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt{a^{2} + a b}}\right )\right )}}{\sqrt{a^{2} + a b} a^{4}} + \frac{105 \, a^{3} \tan \left (d x + c\right )^{6} + 315 \, a^{2} b \tan \left (d x + c\right )^{6} + 315 \, a b^{2} \tan \left (d x + c\right )^{6} + 105 \, b^{3} \tan \left (d x + c\right )^{6} - 35 \, a^{3} \tan \left (d x + c\right )^{4} - 70 \, a^{2} b \tan \left (d x + c\right )^{4} - 35 \, a b^{2} \tan \left (d x + c\right )^{4} + 21 \, a^{3} \tan \left (d x + c\right )^{2} + 21 \, a^{2} b \tan \left (d x + c\right )^{2} - 15 \, a^{3}}{a^{4} \tan \left (d x + c\right )^{7}}}{105 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^8/(a+b*sin(d*x+c)^2),x, algorithm="giac")

[Out]

1/105*(105*(a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*(pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((
a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a^2 + a*b)))/(sqrt(a^2 + a*b)*a^4) + (105*a^3*tan(d*x + c)^6 + 315*a^2*b
*tan(d*x + c)^6 + 315*a*b^2*tan(d*x + c)^6 + 105*b^3*tan(d*x + c)^6 - 35*a^3*tan(d*x + c)^4 - 70*a^2*b*tan(d*x
 + c)^4 - 35*a*b^2*tan(d*x + c)^4 + 21*a^3*tan(d*x + c)^2 + 21*a^2*b*tan(d*x + c)^2 - 15*a^3)/(a^4*tan(d*x + c
)^7))/d